home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Applications / Demos_Demo folder / Demos_Info folder / Demos™ Demonstration / Examples / Completion dates next >
Text File  |  1993-09-08  |  3KB  |  105 lines

  1. { From user A Lumens, Project Datetest at Wed, Sep 8, 1993 3:48 PM}
  2.  
  3.  
  4. { System Variables with non-default values: }
  5. Samplesize := 101
  6. Windows := 2
  7. Sampletype := 2
  8. Usetable := 0
  9. Typechecking := 1
  10. Checking := 1
  11. Saveoptions := 2
  12. Savevalues := 0
  13.  
  14.  
  15. { Non-default Time SysVar value: }
  16. Time := [1993,1994,1995,1996,1997,1998]
  17.  
  18. Project Datetest
  19. Title: Completion Dates
  20. Description: This example shows how to compute completion dates.
  21. Author: A Lumens
  22. Date: Wed, Sep 8, 1993 10:31 AM
  23. Saveauthor: A Lumens
  24. Savedate: Wed, Sep 8, 1993 3:48 PM
  25. Diagstate: 1,58,72,449,243,1
  26. Fileinfo: 0,-5,7532,Project Datetest,Completion test
  27. Getresource Pagesetup,1
  28.  
  29. Chance Funtasktable
  30. Title: Task completion~
  31. table
  32. Description: Hypothetical function task table
  33. Definition: Table(Task,Dates)(
  34. 93,240,
  35. 96,120,
  36. 97,210
  37. )
  38. Location: 176,48
  39. Nodesize: 48,20
  40. Reformdef:           [Dates     ,Task      ]
  41.  
  42. Function Yeartoday(startYear, numDays)
  43. Title: YearToDay
  44. Description: Convert a year (i.e., 93) and a day count to total days since 1993
  45. Definition: (startYear-93)*365~
  46. + numDays
  47. Location: 176,120
  48. Nodesize: 48,20
  49. Windstate: 1,291,589
  50. Paramnames: Startyear, Numdays
  51.  
  52. Index Task
  53. Title: Task
  54. Description: Task
  55. Definition: ['task 1','task 2','task 3']
  56. Location: 64,48
  57. Nodesize: 48,20
  58.  
  59. Index Dates
  60. Title: Dates
  61. Description: Start year and completion days index
  62. Definition: ['Completion Year','Completion Date']
  63. Location: 64,120
  64. Nodesize: 48,20
  65.  
  66. Chance Endyears
  67. Title: EndYears
  68. Description: Years in which function tasks end, calculated from their start year and adding completion dates, both from function task table.
  69. Definition: DayToYear( YearToDay( FuntaskTable[Dates='Completion Year'], FuntaskTable[Dates='Completion Date'] ) )
  70. Location: 312,48
  71. Nodesize: 48,20
  72. Windstate: 1,564,452
  73.  
  74. Function Daytoyear(numDays)
  75. Title: DayToYear
  76. Description: Converts days since Jan 1, 1993 into years~
  77. ~
  78. Note: Round rounds up if more than halfway through the year, so we subtract half a year before rounding.
  79. Definition: Round( numDays/365 - 0.5) + 1993
  80. Location: 176,184
  81. Nodesize: 48,20
  82. Paramnames: Numdays
  83.  
  84. Chance Task_count
  85. Title: Task~
  86. completions by~
  87. year
  88. Description: Match up end years with Years specified in time: this will create a two-dimensional array of 1's and 0's for each task and year (time).  Sum will then add up the 1's across tasks, giving a total number of completed tasks for each year.
  89. Definition: Sum(Endyears=Time,Task)
  90. Location: 312,120
  91. Nodesize: 48,24
  92. Windstate: 1,439,476
  93. Valuestate: 1,141,427,416,303,0,MIDM
  94.  
  95. Chance Cumulrev
  96. Title: Cumulative~
  97. Revenue Incr
  98. Description: Cumulative revenue increase over time, assuming a task completion adds 5%
  99. Definition: Cumulate( Task_count*5%, Time )
  100. Location: 312,184
  101. Nodesize: 48,20
  102. Valuestate: 1,70,346,416,303,0,MIDM
  103.  
  104. Close Datetest
  105.